package sctu.edu.java.year2016.team06.luoxin.day20160522.chapter6_2;

/**前面介绍了去除字符串中所有空格的两种方法，试着不利用这两种方法，只利用for循环和if条件语句实现去除空格。
 * Created by Administrator on 2016/5/23.
 */
public class kongge {
    public static void main(String[] args) {
        String text = "We are students";
        System.out.println("原字符串是：");
        System.out.println(text);
        System.out.println("We are student 去除空格为"+text.replace(" ",""));
    }

}